package com.zy.mydemo.api.controller;

import com.zy.mydemo.api.service.AuthService;
import com.zy.mydemo.common.entity.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:zhongyong
 * @Description：
 * @Date：Create in 2020/05/08
 */
@RestController
@RequestMapping("api/auth")
public class AuthController extends AbstractController {

    @Autowired
    AuthService authService;

    @RequestMapping("/getMenu")
    public String getMenu() {
        UserEntity user = getUser();
        return authService.getListByUser(user).toString();
    }
}
